package com.hskj.springboot.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.ToString;

import java.lang.annotation.Target;
import java.util.Date;

@Data
public class User {
    //数据库自动自动增长
    @TableId(type = IdType.AUTO)
//    @TableId(type = IdType.ID_WORKER)
//    @TableId(type = IdType.NONE)
    private Long id;//主键id
    private String name;
    private Integer age;
    private String email;


    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //乐观锁中对于版本的注解
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;
    //逻辑删除的注解
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
}